.class Lcom/opongo/android/C2DMReceiver$1;
.super Ljava/lang/Object;
.source "C2DMReceiver.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/opongo/android/C2DMReceiver;->onRegistered(Landroid/content/Context;Ljava/lang/String;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/opongo/android/C2DMReceiver;

.field private final synthetic val$apiManager:Lcom/opongo/blogapp/manager/APIManager;

.field private final synthetic val$registrationId:Ljava/lang/String;


# direct methods
.method constructor <init>(Lcom/opongo/android/C2DMReceiver;Lcom/opongo/blogapp/manager/APIManager;Ljava/lang/String;)V
    .locals 0
    .parameter
    .parameter
    .parameter

    .prologue
    .line 1
    iput-object p1, p0, Lcom/opongo/android/C2DMReceiver$1;->this$0:Lcom/opongo/android/C2DMReceiver;

    iput-object p2, p0, Lcom/opongo/android/C2DMReceiver$1;->val$apiManager:Lcom/opongo/blogapp/manager/APIManager;

    iput-object p3, p0, Lcom/opongo/android/C2DMReceiver$1;->val$registrationId:Ljava/lang/String;

    .line 55
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public run()V
    .locals 4

    .prologue
    .line 57
    iget-object v1, p0, Lcom/opongo/android/C2DMReceiver$1;->val$apiManager:Lcom/opongo/blogapp/manager/APIManager;

    iget-object v2, p0, Lcom/opongo/android/C2DMReceiver$1;->val$registrationId:Ljava/lang/String;

    invoke-virtual {v1, v2}, Lcom/opongo/blogapp/manager/APIManager;->registerUser(Ljava/lang/String;)I

    move-result v0

    .line 60
    .local v0, userId:I
    if-lez v0, :cond_1

    .line 61
    sget-boolean v1, Lcom/opongo/android/C2DMReceiver;->DEBUG:Z

    if-eqz v1, :cond_0

    .line 62
    invoke-static {}, Lcom/opongo/android/C2DMReceiver;->access$0()Ljava/lang/String;

    move-result-object v1

    new-instance v2, Ljava/lang/StringBuilder;

    const-string v3, "User successfully registered with id "

    invoke-direct {v2, v3}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 63
    invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v2

    invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v2

    .line 62
    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 72
    :cond_0
    :goto_0
    return-void

    .line 69
    :cond_1
    sget-boolean v1, Lcom/opongo/android/C2DMReceiver;->DEBUG:Z

    if-eqz v1, :cond_0

    .line 70
    invoke-static {}, Lcom/opongo/android/C2DMReceiver;->access$0()Ljava/lang/String;

    move-result-object v1

    const-string v2, "User NOT registered!"

    invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    goto :goto_0
.end method
